<template>
  <div v-if="showIntegrate" @click.self="closeShareInt" class="showIntegrate">
    <div class="img-bg c-p">
      <div class="c-fc-FF2F0B c-textAlign-c c-mt380"><span class="c-fs76 c-fw600">{{integrateCount}}</span><span class="c-fs40 c-fw600 c-ml16">{{companyAuth.integrateName1}}</span></div>
      <div class="c-fc-FF2F0B c-textAlign-c c-fs28 c-fw600 c-mt40 c-text-decoration-underline" @click="goGet()">
        如何获取{{companyAuth.integrateName1}}
      </div>
      <div class="get-btn c-mlr-auto c-flex-row c-flex-center c-fs32 c-fc-white c-mt50" @click="closeShareInt">开心收下</div>
      <img src="https://ck-bkt-knowledge-payment.oss-cn-hangzhou.aliyuncs.com/admin/material/9_material_admin/image/assets/i/wap/course/money.png" class="money" />
    </div>
    <div class="iconfont c-fs40 c-fc-white c-pa top80p c-p-lp50 c-translate-xy-50" @click="closeShareInt">&#xe84e;</div>
    <!-- <div class="integrate-main">
      <div class="integrateContent">
        <div class="c-p">
          <img src="https://ck-bkt-knowledge-payment.oss-cn-hangzhou.aliyuncs.com/admin/material/9_material_admin/image/assets/i/wap/course/integrate.png" class="ints" />
          <div class="c-flex-column intsw c-aligni-center">
            <span class="c-fs24 c-lh" style="color:#FF851A;">恭喜您,{{companyAuth.integrateName1}}+{{integrateCount}}</span>
            <span class="c-fs20 c-lh c-mt20 c-text-decoration-underline" style="color:#A1754F;" @click="goGet()">如何获取{{companyAuth.integrateName1}}</span>
          </div>
          <img src="https://ck-bkt-knowledge-payment.oss-cn-hangzhou.aliyuncs.com/admin/material/9_material_admin/image/assets/i/wap/course/money.png" class="money" />
        </div>
      </div>
    </div> -->
  </div>
</template>

<script>
export default {
  name: 'ShowIntegrate',
  components: {

  },
  props: ['showIntegrate', 'integrateCount'],
  beforeCreate() {

  },
  data() {
    return {
      companyAuth: JSON.parse(localStorage.getItem("companyAuth")),
      showInt: false
    }
  },
  created() {
    this.showInt = this.showIntegrate;
    if (this.showInt == true) {
      let $this = this;
      setTimeout(function () {
        $this.showInt = false;
        $this.$emit('closeShareInt');
      }, 4000);
    }
  },
  mounted() {

  },
  computed: {

  },
  watch: {

  },
  methods: {
    goGet: function () {
      this.$routerGo(this, "push", {
        path: "/member/myIntegral/integralDetail"
      });
    },
    closeShareInt: function () {
      this.$emit('closeShareInt');
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.showIntegrate {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.integrateContent {
  width: 100%;
  left: 0;
  top: 1rem;
  position: relative;
  z-index: 99999;
}
.ints {
    width: 70%;
    position: absolute;
    left: 50%;
    top: 50%;
    /* z-index: 99999; */
    transform: translate(-50%, -50%);
}
.intsw {
  width: 100%;
  position: absolute;
  left: 0;
  top: 56%;
  z-index: 1000;
}
.money {
  widows: 3rem;
  height: 3rem;
  position: absolute;
  top: 8rem;
  left: -5rem;
  z-index: 999;
  animation: moneyMove 2s linear 0.2s;
  -webkit-animation: moneyMove 2s linear 0.2s;
}
@keyframes moneyMove {
  0% {
    top: 8rem;
    left: -5rem;
    width: 3rem;
    height: 3rem;
  }
  100% {
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
  }
}

@-webkit-keyframes moneyMove /* Safari 与 Chrome */ {
  0% {
    top: -3rem;
    left: -3rem;
    width: 3rem;
    height: 3rem;
  }
  100% {
    top: 50%;
    left: 60%;
    width: 1.5rem;
    height: 1.5rem;
  }
}
.integrate-main {
  position: absolute;
  width: 16rem;
  left: 50%;
  top: 50%;
  z-index: 99999;
  transform: translate(-50%, -50%);
}
.img-bg {
  width: 12.5rem;
  height: 18.75rem;
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 99999;
  transform: translate(-50%, -50%);
  background: url('../../../assets/i/wap/common/integration.png') no-repeat center center;
  background-size: 100% 100%;
}
.c-mt380 {
  margin-top: 9.5rem;
}
.get-btn {
  width: 8.5rem;
  height: 2.3rem;
  background-image: linear-gradient(180deg, #FB8A75 0%, #E72B00 100%);
  border-radius: 1.2rem;
}
.top80p {
  top: 80%;
}
</style>
